﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace EHR18
{
    public partial class FromSerialConfig : FrmBase
    {
        public FromSerialConfig()
        {
            InitializeComponent();
        }

        private void FromSerialConfig_Load(object sender, EventArgs e)
        {

        }

        private void button5_Click(object sender, EventArgs e)
        {
            ShowInControl(this.panel1, new FrmSerialPortSetting(LeakageDevice4.instance) { TopLevel = false } );
            label2.Text = (sender as Button).Text;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            ShowInControl(this.panel1, new FrmSerialPortSetting(PLCDevice.instance) { TopLevel = false });
            label2.Text = (sender as Button).Text;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            ShowInControl(this.panel1, new FrmSerialPortSetting(LeakageDevice1.instance) { TopLevel = false });
            label2.Text = (sender as Button).Text;
        }

        private void button3_Click(object sender, EventArgs e)
        {
            ShowInControl(this.panel1, new FrmSerialPortSetting(LeakageDevice2.instance) { TopLevel = false });
            label2.Text = (sender as Button).Text;
        }

        private void button4_Click(object sender, EventArgs e)
        {
            ShowInControl(this.panel1, new FrmSerialPortSetting(LeakageDevice3.instance) { TopLevel = false });
            label2.Text = (sender as Button).Text;
        }
    }
}
